package com.jyy.prefabricated.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;


@Data
public class OrderDto {

    @NotNull(message = "订单类型不能为空")
    private Integer orderType;

    @NotNull(message = "购买数量不能为空")
    private Integer quantity;

    @NotNull(message = "商品id不能为空")
    private Integer productId;
    //（0年、1月、2周、3日）
    private Integer buyType;

    private Integer buyTypeNum;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice ;

    //支付凭证
    private String payOrder;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String payTime;

    //支付渠道：0线上,1线下
    private Integer payType;


}
